<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link href="static/miniApp/css/header.css" rel="stylesheet" />
	<link href="static/miniApp/css/box_style.css" rel="stylesheet" />
	
	<script src="static/miniApp/js/bos_js.js" type="text/javascript"></script>
    	<div class="header">
			<div class="logo">
				<a href='index.jsp'><img class="logo-pic" src="static/miniApp/img/trochili-logo.png" ></a>
				<!--<div class="search">
					<form id="form" name="f" action="app/appSearchPro" class="search-fm">
						<span class="bg s_ipt_wr quickdelete-wrap">
							<span class="search-btn"></span>
							<div id="kw_tip" style="width: initial; margin-left: 38px; max-width: 497px; display: none;" unselectable="on" onselectstart="return false;" class="s_ipt_tip"></div>
							<input id="kw" name="keywords" class="s_ipt" value="" maxlength="255" autocomplete="off">
						</span>
					</form>
				</div>-->
				<c:if test="${!empty loginName }">
				<%-- 	<span class="loginName">您好，${loginName}, <a id="logout" href="miniapp/logout">注销</a><span> --%>
				<a class="header-user-pic" href="miniapp/myapp"><img src="uploadFiles/uploadImgs/userphoto/${miniappLoginApp.icon }" /></a>
				</c:if>
				<c:if test="${empty loginName }">
					<a id="header-login" class="header-login">登录</a>
					<a id="header-register" class="header-register">注册</a>
				</c:if>
			</div>
			<!--<div class="header-nav">
				<ul>
					<li class="active"><a href="app/appIndex" class="">全部</a></li>	
					<c:forEach items="${varList}" var="var" varStatus="vs">
						<li class=""><a href="app/appIndex?COLUMN_ID=${var.ID }">${var.NAME}</a></li>
					</c:forEach>
				</ul>
				<button class="issue">发布小程序</button>
			</div>-->
		</div>
		
		<div class="box_view" id="box-view">
			<div class="box_login">
				<div class="box_login_nav">
					<ul>
						<li class="click" id="login">登录</li>
						<li id="register">注册</li>
					</ul>
				</div>
				<!--登录-->
				<input class="input_box admin login" placeholder="用户名" name='login_name' id="login_name" type="text">
				<input class="input_box password login" placeholder="密码" name='login_pwd' id="login_pwd" type="password">
				<input type="hidden" name="opetype" id="opetype" value="0" /> 
				<!--注册-->
				<input class="input_box admin register" placeholder="邮箱地址" name='email' id="email" type="text">
				<input class="input_box name register" placeholder="账号"  name='name' id="name" type="text">
				<input class="input_box password register" placeholder="密码" name='reg_pwd' id="reg_pwd" type="password">
				<input class="input_box password register" placeholder="密码确认" id="sureid" type="password">
				<button class="box_button" onclick="logindo();">登录</button>
			</div>
			<div class="box_view_bg"></div>
		</div>
<script type="text/javascript">
$("#header-login,#header-register").click(function(){
	if($("#box-view").css("display") == "none"){
		$("#box-view").show();
	}else{
		$("#box-view").hide();
	}
});

$(".box_view_bg").click(function(){
	$("#box-view").hide();
});

$("#header-register").click(function(){
	$(".box_login_nav ul li").removeClass("click");
	$("#register").addClass("click");
	$(".register").show();
	$(".login").hide();
	$("#opetype").val(1);
});
$("#header-login").click(function(){
	$(".box_login_nav ul li").removeClass("click");
	$("#login").addClass("click");
	$(".login").show();
	$(".register").hide();
	$("#opetype").val(0);
});
</script>
